#include <iostream>
using std::cout;
using std::endl;

class Point{
public:
    /* Point(){ */
    /*     cout << "Point()" << endl; */
    /* } */

    Point(int x,int y,int z)
    : _ix(x)
    , _iy(y)
    , _ref(_ix)
    //输入的参数是一个临时变量，注意不要把引用成员绑定到临时变量上
    /* , _ref(z) */
    {
        cout <<"Point(int,int)" << endl;
    }

    void print(){
        cout << "(" << _ix << ","
            << _iy <<  ","
            << _ref << ")" << endl;
    }
private:
    int _ix;
    int _iy;
    int & _ref;
    //C++11
    /* int & _ref = _ix; */
};

void test0(){
    Point pt(1,2,3);
    pt.print();

}

int main(void){
    test0();
    return 0;
}
